Skip to content

[SCIEDU-111] Implement admin experiment management - #52

Open
rickLHY wants to merge 7 commits into
mainfrom
feat/admin-experiment-detail-panel
Open

[SCIEDU-111] Implement admin experiment management#52
rickLHY wants to merge 7 commits into
mainfrom
feat/admin-experiment-detail-panel

Conversation

@rickLHY

@rickLHY rickLHY commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Type of changes

  • Feature

Purpose

  • Implement the Figma-aligned admin experiment list, creation flow, and detail panel.
  • Connect experiment creation, editing, scheduling, archiving, course assignment, and participant management.
  • Add date filtering, pagination, status-aware controls, and Taiwan-time conversion.
  • Implement SCIEDU-111.

Additional Information

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a7610663fa

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +236 to +240
maxAttempts: Number(draft.maxAttempts),
allowRetry: Number(draft.maxAttempts) > 1,
showScore: true,
showExplanations: draft.result === "explanations",
gradingMode: "AUTOMATIC",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve unsupported configuration fields when editing

When an existing experiment uses a valid configuration that this form cannot represent—such as gradingMode: "MANUAL", showScore: false, or the NEVER answer-release mode—clicking Next or saving synthesizes a new configuration with automatic grading and score display enabled (and maps NEVER to course completion). This also occurs when extending an ACTIVE experiment, although those settings appear locked, so the PUT can silently change live experimental conditions or be rejected instead of updating only the end time; preserve the loaded values for fields the user cannot edit.

Useful? React with 👍 / 👎.

Comment on lines +135 to +138
return api<ExperimentDetail>("/api/experiments", {
method: "POST",
body: JSON.stringify(payload),
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep demo-mode experiment mutations local

With VITE_ADMIN_DEMO_MODE=true, the routes bypass authentication and all experiment reads return demo fixtures, but this mutation still POSTs to VITE_BACKEND_BASE_URL; the update and status mutations below behave the same way. Consequently the supposedly local preview either fails as soon as the user advances the creation flow, or, if the browser has ambient credentials, unexpectedly creates or modifies backend data while displaying unrelated demo state. Add demo-mode mutation handling rather than calling the configured API.

Useful? React with 👍 / 👎.

? styles.navActive
: undefined
}
onClick={() => navigate("/admin")}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Route the people navigation to the people view

When a user clicks 人員管理 from any experiment-management page, this sends them to /admin, where AdminDashboardPage initializes activeSection to "overview"; therefore the click opens the overview rather than the requested people-management view. Pass a route state/query/hash that the dashboard consumes, or give the people view its own route.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant